﻿namespace Extensions.Consul
{
    /// <summary>
    /// consul配置类
    /// </summary>
    public class ConsulOption
    {
        /// <summary>
        /// 是否启用consul
        /// </summary>
        public bool Enable { get; set; }
        /// <summary>
        /// 服务的id（要保证唯一）
        /// </summary>
        public string ServiceId { get; set; }
        /// <summary>
        /// 服务的名字（同一种服务 用同一个名字）
        /// </summary>
        public string ServiceName { get; set; }
        /// <summary>
        /// 服务的ip
        /// </summary>
        public string ServiceIP { get; set; }
        /// <summary>
        /// 服务的端口
        /// </summary>
        public int ServicePort { get; set; }
        /// <summary>
        /// 负载均衡策略
        /// </summary>
        public string LBStrategy { get; set; }
        /// <summary>
        /// 权重
        /// </summary>
        public int Weight { get; set; }
        /// <summary>
        /// 服务健康检测的地址
        /// </summary>
        public string ServiceHealthCheckAddress { get; set; }
        /// <summary>
        /// consul
        /// </summary>
        public string ConsulAddress { get; set; }
        /// <summary>
        /// 是否启动配置中心
        /// </summary>
        public bool ConfigurationCenter { get; set; }
        /// <summary>
        /// 远程配置的地址
        /// </summary>
        public string CenterPath { get; set; }
    }
}
